﻿using Company.Application.share.Prism;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Shell.Views
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : MahApps.Metro.Controls.MetroWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
        {
            var vm = DataContext as ViewModels.MainWindowViewModel;

            //第一步加载模块
            vm._moduleManager.LoadModule(ModuleName.ApplicationLoginModule);
            //第二步加载视图
            vm._regionManager.RequestNavigate(RegionNames.MainRegion, "LoginView");

        }
    }
}
